package cn.design;

import cn.design.realize.Person;

/**
 * @author dlq
 * @description 原型模式就是：基于现有的对象，进行对象的一个拷贝，创建另一个实例
 * @date 2020/9/14 10:02
 * @since 1.0
 */
public class PrototypeTest {
    public static void main(String[] args) throws CloneNotSupportedException {
        //原型模式
        Person person = new Person().clone();
        Person personClone = person.clone();
        System.out.println(personClone.toString());
        System.out.println(person == personClone);


    }
}
